A cache memory is a storage device that is disposed between a processor and a main memory. The cache memory is smaller in capacity than the main memory, but can access a CPU at a high speed.
If data requested by the processor is present in the cache memory, this is called “hit”, and if the data requested by the processor is not present in the cache memory, this is called “miss”. In the case of the miss, a process called “refill” is performed so as to replace data in the cache memory.
Generally, in the field of memories, spatial locality (locality principle stating that if an item is referenced, nearby items will tend to be referenced soon) is known. If a size of data that is to be refilled (hereinafter, referred to as “refill size”) is increased to some extent, a hit rate can be increased.
Nevertheless, capacity of the cache memory is limited. Therefore, if the refill size is too large, even the data requested by the processor might be replaced, and accordingly the hit rate might be decreased (miss rate might be increased). Such a situation is likely to occur especially when a program does not immediately use data that follows data that has caused the miss.
Regarding optimization of the refill size, a technology disclosed in Patent Literature 1 is known.